From: Florian Müllner Date: Tue, 10 Sep 2019 02:40:15 +0000 (+0200) Subject: shell: Replace another GTimeVal X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~811^2^2~137 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a030c546618505a79d1814f0ebae79902b311ed8;p=gnome-shell.git shell: Replace another GTimeVal This slipped through in commit 9b7f228f8ef. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/709 --- diff --git a/src/shell-util.c b/src/shell-util.c index d38c5ab98..3f57ada8d 100644 --- a/src/shell-util.c +++ b/src/shell-util.c @@ -144,13 +144,9 @@ shell_util_format_date (const char *format, gint64 time_ms) { GDateTime *datetime; - GTimeVal tv; char *result; - tv.tv_sec = time_ms / 1000; - tv.tv_usec = (time_ms % 1000) * 1000; - - datetime = g_date_time_new_from_timeval_local (&tv); + datetime = g_date_time_new_from_unix_local (time_ms / 1000); if (!datetime) /* time_ms is out of range of GDateTime */ return g_strdup ("");